﻿Option Strict On
Option Explicit On

Namespace Blog

    <CLSCompliant(True)> _
    Public Class TagUtils

        Public Shared Function GetTagsById(ByVal intTagId As Integer) As Tag

            Dim objTag As BlogSpark.Blog.Tag
            Dim dt As DataTable = BlogSpark.DataProvider.SPs.GetTagsByTagId(BlogSpark.DataProvider.Data.ConnectionType, intTagId).Tables(0)

            If dt.Rows.Count > 0 Then
                objTag = New BlogSpark.Blog.Tag
                objTag.Fill(dt.Rows(0))
                Return objTag
            Else
                Return Nothing
            End If

        End Function

    End Class

End Namespace